package afcp.alumni.action.base;

import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.RedirectResolution;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.validation.ValidationErrorHandler;
import net.sourceforge.stripes.validation.ValidationErrors;


public abstract class EventAction extends BaseAction implements ValidationErrorHandler {
	
	protected abstract String fromUrl();

	@Override
	public Resolution handleValidationErrors(ValidationErrors errors)
			throws Exception {
		return new ForwardResolution(fromUrl());
	}
	
	protected Resolution fromRedirect() {
		return new RedirectResolution(fromUrl());
	}

}
